/* Copyright (c) 2011 Jordan Gray, MIT; see COPYRIGHT */

#include "x_and_y.h"

namespace ex01 {

X::X(int num) : i(num) {}

X X::operator+(int num) {
  return X(i+num);
}

Y::Y(X x) : i(x.i) {}

Y Y::operator+(X x) {
  return Y(x+i);
}

Y::operator int() { return i; }

} // namespace
